﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    Inherits="Nivdal.InternationalCup" Title="" StylesheetTheme="SkinFile"
    CodeBehind="InternationalCup.aspx.cs" %>

<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, InternationalCupp_PageNameLabel %>"
        CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="Updatepanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <div class="basic_element">
        <div class="red_title">
               <asp:Label ID="PageTitleLabel" runat="server" Text="<%$ Resources:Resource, InternationalCupp_PageNameLabel %>" CssClass="white_title"></asp:Label>
        </div>
        <div class="padding5">
            <asp:Label ID="ErrorLabel" runat="server" Text="" SkinID="RedSmallHeaderLabel"></asp:Label>


        
        
            <table style="width: 100%;" cellpadding="5" cellspacing="1">
                <tr>
                    <td style="vertical-align:top; width:20%">
                        <%--<asp:Image ID="InternationslCupImage" runat="server" ImageUrl="~/Images/internationalCup.png" />
                        <br /><br />--%>
                        <asp:DropDownList ID="SeasonDropDownList" runat="server" DataSourceID="SeasonSqlDataSource"
                            DataTextField="SeasonName" DataValueField="Season" AutoPostBack="true" EnableViewState="true"
                            OnSelectedIndexChanged="SeasonDropDownList_SelectedIndexChanged">
                        </asp:DropDownList>
                        <br /><br />
                        <asp:FormView ID="InternationalCupFormView" runat="server" DataSourceID="InternationalCupSqlDataSource">
                            <ItemTemplate>
                                <asp:Label ID="CurrentRoundTitleLabel" runat="server" Text="<%$ Resources:Resource, InternationalCupp_CurrentRoundTitleLabel %>"
                                    SkinID="InfoLabel"></asp:Label>
                                <asp:Label ID="CurrentRoundLabel" runat="server" Text='<%# Eval("CurrentRound") %>'
                                    SkinID="InfoLabel" />
                                <br />
                                <asp:Label ID="WinnerNameLabel" runat="server" Text='<%# Resources.Resource.Global_Winner+ ":"%>'
                                    Visible='<%# IsCupIsOver(Eval("IsOver")) %>' SkinID="InfoLabel"></asp:Label>
                                <asp:HyperLink ID="WinnerNameLinkButton" runat="server" Text='<%# Eval("WinnerName") %>'
                                    NavigateUrl='<%# Eval("WinnerId", "TeamHomePage.aspx?TeamId={0}") %>' Visible='<%# IsCupIsOver(Eval("IsOver")) %>'
                                    SkinID="GreenTitleHyperLink"></asp:HyperLink>
                                <asp:Label ID="InProgressLabel" runat="server" Text="<%$ Resources:Resource, Global_CompetitionInProgress %>"
                                    SkinID="InfoLabel" Visible='<%# !IsCupIsOver(Eval("IsOver")) %>'></asp:Label>
                                <br />
                            </ItemTemplate>
                        </asp:FormView>
                        <br />
                        <asp:HyperLink ID="InternationalCupFixturesLinkButton" Text="<%$ Resources:Resource, InternationalCupp_InternationalCupFixturesLinkButton %>"
                        runat="server" SkinID="GreenTitleHyperLink"></asp:HyperLink>
                        <asp:SqlDataSource ID="InternationalCupSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                            SelectCommand="Nivdal_ShowInternationalCupDetails" SelectCommandType="StoredProcedure">
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="SeasonSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                            SelectCommand="Nivdal_ShowInternationalCupSeasonList" SelectCommandType="StoredProcedure">
                        </asp:SqlDataSource>
                    </td>
                    <td style="vertical-align:top; width:35%;">
                        <asp:Label ID="TeamsLeftTitleLabel" runat="server" Text="<%$ Resources:Resource, InternationalCupp_TeamsLeftTitleLabel %>"
                            SkinID="InfoLabel"></asp:Label>
                        <asp:GridView ID="InternationalCupTeamsLeftByCountryGridView" runat="server" DataSourceID="InternationalCupTeamsLeftByCountrySqlDataSource"
                            SkinID="BigProfessional" AutoGenerateColumns="False" AllowPaging="True" EnableTheming="True">
                            <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
                                Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
                           <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
                            <Columns>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <asp:Label ID="CountryNameLabel" runat="server" Text="<%$ Resources:Resource, Global_CountryName %>"></asp:Label>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:ImageButton ID="FlagImageButton" runat="server" PostBackUrl='<%# Eval("CountryId", "Country.aspx?CountryId={0}") %>'
                                            ImageUrl='<%# Eval("Flag", "~/Images/Flags/{0}") %>' ToolTip='<%# Eval("CountryName") %>' />
                                        <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("CountryName") %>' NavigateUrl='<%# Eval("CountryId", "Country.aspx?Id={0}") %>'
                                            SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <asp:Label ID="TeamsLeftLabel" runat="server" Text="<%$ Resources:Resource, TeamsLeftLabel %>"></asp:Label>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("TeamsLeft") %>' SkinID="GridLabel"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <asp:SqlDataSource ID="InternationalCupTeamsLeftByCountrySqlDataSource" runat="server"
                            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="Nivdal_ShowInternationalCupTeamsLeftByCountry"
                            SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                    </td>
                    <td style="vertical-align:top; width:45%;">
                        <asp:Label ID="CupWinnersTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_CupWinner %>"
                            SkinID="InfoLabel"></asp:Label>
                        <asp:GridView ID="InternationalCupWinnersGridView" runat="server" DataSourceID="InternationalCupWinnersSqlDataSource"
                            SkinID="Professional" AutoGenerateColumns="False" AllowPaging="True" Font-Size="13px"
                            EnableTheming="True">
                            <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
                                Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
                            <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
                            <Columns>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <asp:Label ID="SeasonLabel" runat="server" Text="<%$ Resources:Resource, Global_Season %>"></asp:Label>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("Season") %>' SkinID="GridLabel"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <asp:Label ID="WinnerLabel" runat="server" Text="<%$ Resources:Resource, Global_Winner %>"></asp:Label>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="InProgressGridLabel" runat="server" Text="<%$ Resources:Resource, Global_CompetitionInProgress%>"
                                            Visible='<%# !IsTeam(Eval("TeamId")) %>' SkinID="GridLabel"> </asp:Label>
                                        <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("TeamName") %>' SkinID="BlackHyperLinkSkin"
                                            NavigateUrl='<%# Eval("TeamId", "TeamHomePage.aspx?TeamId={0}") %>' Visible='<%# IsTeam(Eval("TeamId")) %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <EmptyDataTemplate>
                                <asp:Label ID="NoHistoryLabel" runat="server" Text="<%$ Resources:Resource, InternationalCupp_NoHistoryLabel %>"></asp:Label>
                            </EmptyDataTemplate>
                        </asp:GridView>
                        <asp:SqlDataSource ID="InternationalCupWinnersSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                            SelectCommand="Nivdal_ShowInternationalCupWinnersList" SelectCommandType="StoredProcedure">
                        </asp:SqlDataSource>
                    </td>
                </tr>
            </table>
    
            
        </div>
        </div>
    </ContentTemplate>
    </asp:UpdatePanel>
    
</asp:Content>
